<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDakaContentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('daka_content', function(Blueprint $table)
        {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('发布者');
            $table->integer('img_id')->default(0)->comment('默认图标');
            $table->integer('thumb_img_id')->default(0)->comment('默认图标');
            $table->string('title')->nullable()->comment('文章标题');
            $table->text('content')->nullable()->comment('文章内容');
            $table->integer('daka_count')->default(0)->comment('打卡数量');
            $table->integer('user_count')->default(0)->comment('用户参与人数');
            $table->integer('is_active')->default(0)->comment('是否主要文章');
            $table->integer('status')->default(0)->comment('状态，0:隐藏，1:显示');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
